<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import = "java.io.*" %>
<%@ page import = "java.util.*" %>
<%@ page import = "org.apache.poi.hssf.usermodel.*" %>
<jsp:useBean id="ApplyInfo" class="com.fnst.caesar.ApplyInfo" scope="session"/>
<%!
	public List readExcel(String path)
	{
		List result = new ArrayList();
		File f = new File(path);
		InputStream is = new FileInputStream(f);
		HSSFWorkbook wb = new HSSFWorkbook(is);
		HSSFSheet sht = wb.getSheetAt(0);
		int lastLine = sht.getLastRowNum();
		for(int i = 1; i <= lastLine; i++)
		{
			HSSFRow row = sht.getRow(i);
			int lastCell = row.getLastCellNum();
			for(int j = 0; j <= lastCell; j++)
			{
				HSSFCell cell = row.getCell(j);
				if(cell.getCellType() != HSSFCell.CELL_TYPE_NUMERIC)
				{
					HSSFRichTextString rts = cell.getRichStringCellValue();
					String content = rts.getString();
					ApplyInfo ai = new ApplyInfo();
					
				}
				else
				{
					double content = cell.getNumericCellValue();
					System.out.print("<The content at row "+i+" ,col "+j+" is:"+content+">");
				}
			}
		}
	}
%>
